<script type="text/javascript">
    window.addEvent('domready', function(){
        var tabs = new Tabs();
        tabs.initTabs(); 
    });
</script>

<div class="form-wrap">
    <form action="<?=URL::site('items/additem')?>" method="post">
        <input type="hidden" name="id" value="<?=$data['id']?>" />
        <h2>Dodaj nowy produkt</h2>
        <div class="form-status-wrap">
            <?if($status == 'save_success'):?>
            Zapisano pomyślnie
            <?endif;?>
        </div>
        <div class="form-content-wrap">
            <div class="tabs-wrap">
                <div class="tabs-head-wrap">
                    <div class="tab-head tab-head-1">Podstawowe</div>
                    <div class="tab-head tab-head-2">Inne</div>
                </div>
                <div class="tabs-body-wrap">
                    <div class="tab-body tab-body-1">
                        <table class="form-table" style="float: left; width: 45%;">
                            <caption>

                            </caption>
                            <tbody>
                                <tr>
                                    <th><label for="inp_name">Nazwa</label></th>
                                    <td><?= form::input('name', Request::g('name', $data), array('id' => 'inp_name', 'class' => 'input-text')) ?></td>
                                </tr>
                                <tr>
                                    <th><label for="inp_category">Kategoria</label></th>
                                    <td><?= form::input('category', Request::g('category', $data), array('id' => 'inp_category', 'class' => 'input-text')) ?></td>
                                </tr>
                                <tr>
                                    <th><label for="inp_producer">Producent</label></th>
                                    <td><?= form::input('producer', Request::g('producer', $data), array('id' => 'inp_producer', 'class' => 'input-text')) ?></td>
                                </tr>
                                <tr>
                                    <th><label for="inp_price">Cena</label></th>
                                    <td><?= form::input('price', Request::g('price', $data), array('id' => 'inp_price', 'class' => 'input-numeric')) ?>zł NETTO</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>  <!-- //. tab-body .tab-body-1 -->

                    <div class="tab-body tab-body-1">
                        <div>
                            <label for="inp_description">Opis</label><br/>
                            <textarea cols="50" rows="10" id="inp_description" name="description"><?= Request::g('description', $data) ?></textarea>
                        </div>
                    </div>  <!-- //. tab-body .tab-body-2 -->
                </div>
            </div>
            <?if($id):?>
                <input type="submit" name="submit" value="Zapisz" />
            <?else:?>
                <input type="submit" name="submit" value="Dodaj" />
            <?endif;?>
        </div>
    </form>
</div>